<template>
  <div>
    <ul>
      <li><router-link to="/home" active-class="active">首页</router-link></li>
      <li><router-link to="/items" active-class="active">分类</router-link></li>
      <li><router-link to="/order" active-class="active">订单</router-link></li>
      <li><router-link to="/user" active-class="active">我的</router-link></li>
      <li><router-link to="/link" active-class="active">链接</router-link></li>
    </ul>

    <h1>显示路由自由切换的页面↓</h1>
    <div style="border-top: 4px solid red"></div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {};
</script>

<style>
.active {
  list-style: none;
  margin-left: 10px;
  color: royalblue;
}
</style>